package com.small.common.base.service;

import com.small.common.msg.MsgPage;
import com.small.common.util.Query;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * 作者: fenny
 * 邮箱: 893146555@qq.com
 * 时间: 2017/10/13 17:33
 * 描述:
 */
public interface BaseService<M extends Mapper<T>, T> {

    T selectOne(T entity);

    T selectById(Object id);

    List<T> selectList(T entity);

    List<T> selectListAll();

    int selectCount(T entity);

    int insert(T entity);

    int insertSelective(T entity);

    int delete(T entity);

    int deleteById(Object id);

    int updateById(T entity);

    int updateSelectiveById(T entity);

    List<T> selectByExample(Object example);

    int selectCountByExample(Object example);

    MsgPage<T> selectByQuery(Query query);

}
